package samples.d2.trames 
{
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import samples.BaseSample;
	import shapes.shapes2D.distribution.Grid;
	import shapes.shapes2D.distribution.Hexagonal;
	import shapes.shapes2D.distribution.Triangular;
	import shapes.shapes2D.Dot;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class TriangularSample extends BaseSample
	{
		
		static private var jittering:Boolean = false;
		public function TriangularSample( jitter:Number = 0 ) 
		{
			
			var points:Vector.<Point> = Triangular.distribute( 50, sw, sh, (jittering ) ? jitter : 0 );
			
			jittering = ( !jittering ) ? true : false;
			
			graphics.clear();
			graphics.lineStyle( 0, color );
			for each( var p:Point in points )
			{
				
				graphics.drawCircle( p.x, p.y, 1);
				
			}
			
		}
		
	}

}